package com.abvnet.project.water.project.service;

import com.abvnet.common.utils.text.Convert;
import com.abvnet.project.water.project.domain.ProjectCase;
import com.abvnet.project.water.project.mapper.ProjectCaseMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 案例详情 服务层实现
 * 
 * @author duj
 * @date 2019-08-26
 */
@Service
public class ProjectCaseServiceImpl implements IProjectCaseService {
	@Autowired
	private ProjectCaseMapper projectCaseMapper;

	/**
     * 查询案例详情信息
     * 
     * @param caseId 案例详情ID
     * @return 案例详情信息
     */
    @Override
	public ProjectCase selectProjectCaseById(Long caseId) {
	    return projectCaseMapper.selectProjectCaseById(caseId);
	}

    @Override
    public ProjectCase selectProjectCaseByProjectId(Long projectId) {
        return projectCaseMapper.selectProjectCaseByProjectId(projectId);
    }

    /**
     * 查询案例详情列表
     * 
     * @param projectCase 案例详情信息
     * @return 案例详情集合
     */
	@Override
	public List<ProjectCase> selectProjectCaseList(ProjectCase projectCase) {
	    return projectCaseMapper.selectProjectCaseList(projectCase);
	}
	
    /**
     * 新增案例详情
     * 
     * @param projectCase 案例详情信息
     * @return 结果
     */
	@Override
	public int insertProjectCase(ProjectCase projectCase) {
	    return projectCaseMapper.insertProjectCase(projectCase);
	}
	
	/**
     * 修改案例详情
     * 
     * @param projectCase 案例详情信息
     * @return 结果
     */
	@Override
	public int updateProjectCase(ProjectCase projectCase) {
	    return projectCaseMapper.updateProjectCase(projectCase);
	}

	/**
     * 删除案例详情对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteProjectCaseByIds(String ids) {
		return projectCaseMapper.deleteProjectCaseByIds(Convert.toStrArray(ids));
	}
	
}